Get Transaction By ID/UUID
Use this endpoint to retrieve transaction details using either ID or UUID as a query parameter. These values can be found in the transaction details section of the merchant portal or in the API response. This helps fetch transaction-specific data for auditing, reconciliation, support, or record-keeping purposes.
Endpoint
Method: GET
URL: baseUrl/api/v1/transactions/
Query Parameters
You can use either id or uuid as a query parameter to fetch the transaction:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | No | The unique transaction ID to fetch |
uuid | string | No | The unique UUID to fetch |
Note: You must provide either
idoruuid. If more than one is provided, the API will prioritize one.
Headers
Authorization: Bearer {{accessToken}}(Include the token obtained from the Authentication API)Content-Type: application/json
Example Requests
By Transaction ID:
GET /api/v1/transactions/?id=1004 HTTP/1.1
Authorization: Bearer {{accessToken}}
Content-Type: application/json
By UUID:
GET /api/v1/transactions/?uuid=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Authorization: Bearer {{accessToken}}
Content-Type: application/json
Response
A successful response returns a JSON object with the same structure as the Purchase API response:
{
"status": "APPROVED",
"message": "Approved",
"receipt": {
"id": 496,
"merchantNameAr": "Bab Merchant Ar",
"merchantNameEn": "Bab Merchant",
"addressAr": "الرياض",
"addressEn": "Riyadh",
"startDate": "27/05/2025",
"startTime": "13:21:51",
"startDateTime": null,
"endDateTime": null,
"acquirerCode": "INMA",
"merchantId": "100000000000001",
"terminalId": "0210046200100462",
"merchantCategoryCode": "0763",
"stan": "000059",
"appVersion": "1.0.0",
"rrn": "514713000747",
"cardSchemeId": "P1",
"cardSchemeAr": "مدى",
"cardSchemeEn": "Mada",
"applicationLabelAr": null,
"applicationLabelEn": null,
"pan": "5069 68** **** 9140",
"cardExpiration": "29/02",
"transactionTypeAr": "شراء",
"transactionTypeEn": "PURCHASE",
"amountAuthorized": "1000",
"amountAuthorizedAr": "مبلغ الشراء",
"amountAuthorizedEn": "PURCHASE AMOUNT",
"statusMessageAr": "مقبولة",
"statusMessageEn": "Approved",
"verificationMethodAr": "تم التحقق من هوية حامل الجهاز ",
"verificationMethodEn": "DEVICE OWNER IDENTITY VERIFIED",
"approvalCodeAr": "رمز الموافقة",
"approvalCodeEn": "Approval Code",
"approvalCode": "519030",
"endTime": "13:21:53",
"endDate": "27/05/2025",
"entryMode": "CONTACTLESS",
"switchResponseCode": "000",
"applicationIdentifier": "A0000002281010",
"terminalVerificationResult": "0080008000",
"transactionStateInformation": "0000",
"cardholderVerificationResult": "640300",
"cryptogramInformationData": "80",
"applicationCryptogram": "AB621EA892D7072B",
"kernelId": "2d",
"paymentAccountReference": "23R0380GI98ZLTVEDGWQSUTKYVMDD",
"thanksMessageAr": "شكرا لاستخدامكم مدى",
"thanksMessageEn": "Thank you for using mada",
"saveReceiptMessageAr": "يرجى الاحتفاظ بالفاتورة",
"saveReceiptMessageEn": "please retain receipt",
"providerResponseCode": null
}
}
For a full list of response fields and their descriptions, see the Purchase API documentation.
Error Handling
If the transaction is not found or another error occurs, you may receive an error response:
{
"status": "failed",
"msg": "Transaction not found"
}
Usage Tips
- Token Authorization: Always ensure your token is valid before making a request. Include it in the
Authorizationheader in the format:Authorization: Bearer <accessToken>. - Transaction ID: Use the correct and existing transaction ID to avoid errors.
- Reference: For more details on the response fields, refer to the Purchase API.